<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('发货单列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>订单ID 关联order.id：</p>
                                <input type="text" name="orderId"/>
                            </li>
                            <li>
                                <p>用户id 关联user.id：</p>
                                <input type="text" name="userId"/>
                            </li>
                            <li>
                                <p>物流公司编码：</p>
                                <input type="text" name="logiCode"/>
                            </li>
                            <li>
                                <p>物流单号：</p>
                                <input type="text" name="logiNo"/>
                            </li>
                            <li>
                                <p>快递物流信息：</p>
                                <input type="text" name="logiInformation"/>
                            </li>
                            <li>
                                <p>0快递信息可能更新  1快递信息不更新了：</p>
                                <select name="logiStatus">
                                    <option value="">所有</option>
                                </select>
                            </li>
                            <li>
                                <p>收货地区ID：</p>
                                <input type="text" name="shipAreaId"/>
                            </li>
                            <li>
                                <p>收货详细地址：</p>
                                <input type="text" name="shipAddress"/>
                            </li>
                            <li>
                                <p>收货人姓名：</p>
                                <input type="text" name="shipName"/>
                            </li>
                            <li>
                                <p>收货电话：</p>
                                <input type="text" name="shipMobile"/>
                            </li>
                            <li>
                                <p>确认收货时间：</p>
                                <input type="text" name="confirmTime"/>
                            </li>
                            <li>
                                <p>状态 1=准备发货 2=已发货 3=已确认 4=其他：</p>
                                <select name="status">
                                    <option value="">所有</option>
                                </select>
                            </li>
                            <li>
                                <p>备注：</p>
                                <input type="text" name="memo"/>
                            </li>
                            <li>
                                <p>申请时间：</p>
                                <input type="text" name="ctime"/>
                            </li>
                            <li>
                                <p>更新时间：</p>
                                <input type="text" name="utime"/>
                            </li>
                            <li>
                                <p>所属店铺：</p>
                                <input type="text" name="storeId"/>
                            </li>
                            <li>
                                <p>收货地址表id：</p>
                                <input type="text" name="companyAddressId"/>
                            </li>
                            <li>
                                <p>订单编号：</p>
                                <input type="text" name="orderSn"/>
                            </li>
                            <li>
                                <p>邮政编码：</p>
                                <input type="text" name="shipPostCode"/>
                            </li>
                            <li>
                                <p>物流公司名字：</p>
                                <input type="text" name="logiName"/>
                            </li>
                            <li>
                                <p>物流公司名字：</p>
                                <input type="text" name="deliverySn"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="bill:delivery:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="bill:delivery:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="bill:delivery:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bill:delivery:export">
                    <i class="fa fa-download"></i> 导出
                 </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table" data-mobile-responsive="true"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('bill:delivery:edit')}]];
        var removeFlag = [[${@permission.hasPermi('bill:delivery:remove')}]];
        var prefix = ctx + "bill/delivery";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "发货单",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'deliveryId', 
                    title : '物流公司名字',
                    visible: false
                },
                {
                    field : 'orderId', 
                    title : '订单ID 关联order.id'
                },
                {
                    field : 'userId', 
                    title : '用户id 关联user.id'
                },
                {
                    field : 'logiCode', 
                    title : '物流公司编码'
                },
                {
                    field : 'logiNo', 
                    title : '物流单号'
                },
                {
                    field : 'logiInformation', 
                    title : '快递物流信息'
                },
                {
                    field : 'logiStatus', 
                    title : '0快递信息可能更新  1快递信息不更新了'
                },
                {
                    field : 'shipAreaId', 
                    title : '收货地区ID'
                },
                {
                    field : 'shipAddress', 
                    title : '收货详细地址'
                },
                {
                    field : 'shipName', 
                    title : '收货人姓名'
                },
                {
                    field : 'shipMobile', 
                    title : '收货电话'
                },
                {
                    field : 'confirmTime', 
                    title : '确认收货时间'
                },
                {
                    field : 'status', 
                    title : '状态 1=准备发货 2=已发货 3=已确认 4=其他'
                },
                {
                    field : 'memo', 
                    title : '备注'
                },
                {
                    field : 'ctime', 
                    title : '申请时间'
                },
                {
                    field : 'utime', 
                    title : '更新时间'
                },
                {
                    field : 'storeId', 
                    title : '所属店铺'
                },
                {
                    field : 'companyAddressId', 
                    title : '收货地址表id'
                },
                {
                    field : 'orderSn', 
                    title : '订单编号'
                },
                {
                    field : 'shipPostCode', 
                    title : '邮政编码'
                },
                {
                    field : 'logiName', 
                    title : '物流公司名字'
                },
                {
                    field : 'deliverySn', 
                    title : '物流公司名字'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.deliveryId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.deliveryId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>